package com.lxq.dao;

import com.lxq.model.Person;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import java.util.List;

public class PersonDaoImp extends HibernateDaoSupport implements PersonDao {
    @Override
    public List<Person> search() {
        return getHibernateTemplate().find("from Person");
    }

    @Override
    public void addPerson(Person person) {
        getHibernateTemplate().save(person);
    }
}
